
package horde.standard.resources.graphics;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import javax.swing.JFrame;

/**
 * @author Andres Picazo and Arturo Mazon
 */
public class HFrame extends JFrame {

    public HFrame (String title, int width, int heigth) {
        super(title);
        init (width, heigth);
    }

    public HFrame (String title, int width, int heigth, Component center) {
        super(title);
        init (width, heigth);
        add (center, BorderLayout.CENTER);
    }

    private void init (int width, int heigth) {
        setSize(new Dimension(width, heigth));
        setLocationRelativeTo (null);
        setLayout(new BorderLayout());
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    }
}
